package com.banyuan.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Author implements Serializable {
    private Integer id;
    private String userName;
    private String password;
    private String nickName;
    private Date createTime;
    private Date updateTime;

    public Author() {
    }

    public Author(Integer id, String userName, String password, String nickName, Date createTime, Date updateTime) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.nickName = nickName;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Author{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", nickName='" + nickName + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Author author = (Author) o;
        return Objects.equals(id, author.id) && Objects.equals(userName, author.userName) && Objects.equals(password, author.password) && Objects.equals(nickName, author.nickName) && Objects.equals(createTime, author.createTime) && Objects.equals(updateTime, author.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userName, password, nickName, createTime, updateTime);
    }
}
